<?php
// print_r($_GET); die; 
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

// normal page 

get_header();
?>
<!-- Menu các trang ảnh cưới  -->
<?php get_sidebar('anhcuoi') ?>
<!-- End menu ảnh cưới -->
<?php
$user_ID = get_current_user_id();

$thumb_path = my_get_home_path() . "/media/user_{$user_ID}/album-cuoi/thumbs/";
$thumb_url = get_site_url() . "/media/user_{$user_ID}/album-cuoi/thumbs/";


if (is_dir($thumb_path)) { //IF USER HAVE NOT CHOOOSE IMG 
    
    $allthumbs = scandir($thumb_path);
	
    foreach($allthumbs as $key=>$value){
        if($key == 0  || $key == 1 || $key == 2) unset($allthumbs[$key]);
    }
    $allthumbs = array_values($allthumbs);
	
} else {

    echo " <h1> <center>Folder is not exists </center></h1> ";
    die;
}
?>

<div id="sv-container"></div>
<script src="<?php echo bloginfo('template_url'); ?>/js/jquery.masonry.min.js" type="text/javascript"></script>
<script src="<?php echo bloginfo('template_url'); ?>/js/jquery.infinitescroll.js" type="text/javascript"></script>
<link rel="stylesheet" href="<?php echo bloginfo('template_url'); ?>/css/secondeffect.css" type="text/css" media="screen"/>
<style type="text/css">
    #infscr-loading {
        position: fixed;
        top: 40%;
        left: 48%;
        z-index: 9999;
    }
    #infscr-loading em{
        display: none;
    }
    .list-album{
        margin: 15px;
    }
    #layout-demo .item {
        margin: 2px 0;
    }

    #layout-demo .masonry {
        margin: 0 auto;
    }
    .second-effect img{
        width: 100% !important;
        height: auto !important;
    }
    .thumb-sm img {
        height: 60px;
        width: 120px;
    }
    .container .col-5.abcxyz {
        float: right;
        width: 298px;
    }
</style>
<div class="list-album">
<div class="slide_thumb">
<div id="layout-demo" >
    <div id="container" class="masonry clickable"  style="opacity: 0;">
        <?php
        global $wpdb;
        //Sets the number of images to display
        $limit = 10;
        
        if (is_array($allthumbs)) {
            foreach ($allthumbs as $key=> $row) {
				 
				$imgurl = get_site_url() . "/media/user_{$user_ID}/album-cuoi/thumbs/" . $row;

                list($width, $height, $type, $attr) = getimagesize($thumb_path.$row);
					$height = 'auto' ; 
					$width = 400;
				 ?>
                <div class="item <?php echo $class ?>">
                    <div class="view second-effect">
                        <img height="<?php echo $height ?>" width="<?php echo $width ?>" src="<?php echo $imgurl ?>"  alt="<?php echo $pix->alttext ?>" />
                        <div class="mask">
                            <a href="javascript:;" class="info" data="<?php echo $key+1 ?>">Read More</a>
                        </div>
                    </div>
                </div>  
        <?php }
        }
        ?>
    </div>
</div>
<nav id="page-nav">
    <a href="<?php echo site_url() ?>/gallery-page-2.html?t=2"></a>
</nav>
</div>
</div>
<script type type="text/javascript">
    var curWidth; 
    var detector;
    var $container = $('#container');

    detector = $('.slide_thumb');
    curWidth = Math.floor(detector.outerWidth(true)/4);

    $(window).resize(function(){
        $('.container .col-7.abcxyz').css('width',($('.container').outerWidth(true)-315-10)+'px');
        refresh_masonry();
    });
    $(function() {
        $container.imagesLoaded(function() {
            curWidth = Math.floor(detector.outerWidth(true)/4);
            $('.masonry .item > div').css('width',(curWidth-4)+'px');
            $container.animate({opacity: 1});
            $container.masonry({
                itemSelector: '.item',
                columnWidth: curWidth,
                isFitWidth : true,
                gutter: 2
            });
        });

        $container.infinitescroll({
            navSelector: '#page-nav', // selector for the paged navigation
            nextSelector: '#page-nav a', // selector for the NEXT link (to page 2)
            itemSelector: '.item', // selector for all items you'll retrieve
            loading: {
                finishedMsg: 'No more pages to load.',
                img: 'http://i.imgur.com/6RMhx.gif'
            }
        },
        // trigger Masonry as a callback
        function(newElements) {
            // hide new items while they are loading
            var $newElems = $(newElements).css({opacity: 0});
            // ensure that images load before adding to masonry layout
            $newElems.imagesLoaded(function() {
                // show elems now they're ready
                curWidth = Math.floor(detector.outerWidth(true)/4);
                $newElems.animate({opacity: 1});
                $newElems.find('.view').css('width',(curWidth-4)+'px');
                $container.masonry('appended', $newElems);
            });
        }
        );

    });
    function refresh_masonry(){
        if(Math.floor(detector.outerWidth(true)/4)!=curWidth){
            curWidth = Math.floor(detector.outerWidth(true)/4);
            $('.masonry .item > div').css('width',(curWidth-4)+'px');
            $container.masonry( 'option', { columnWidth: curWidth });
            $container.masonry('reload');
        }
    }
</script>

<div class="anhcuoiblock">
<!-- Add fancyBox -->
<link rel="stylesheet" href="<?php echo bloginfo('template_url'); ?>/js/fancybox/jquery.fancybox.css?v=2.1.5" type="text/css" media="screen" />
<script type="text/javascript" src="<?php echo bloginfo('template_url'); ?>/js/fancybox/jquery.fancybox.pack.js?v=2.1.5"></script>
<!-- Optionally add helpers - button, thumbnail and/or media -->
<link rel="stylesheet" href="<?php echo bloginfo('template_url'); ?>/js/fancybox/helpers/jquery.fancybox-buttons.css?v=1.0.5" type="text/css" media="screen" />
<script type="text/javascript" src="<?php echo bloginfo('template_url'); ?>/js/fancybox/helpers/jquery.fancybox-buttons.js?v=1.0.5"></script>
<script type="text/javascript" src="<?php echo bloginfo('template_url'); ?>/js/svcore/js/simpleviewer.js"></script>
<?php

$xml_path = 	my_get_home_path() . "/media/user_{$user_ID}/album-cuoi/full/";
$xml_url  =   	get_site_url() . "/media/user_{$user_ID}/album-cuoi/full/";

if (!file_exists($xml_path . "/gallery.xml") || 1) {
    $fileLocation = $xml_path . "/gallery.xml";
    $file = fopen($fileLocation, "w");
    $content = '<?xml version="1.0" encoding="UTF-8"?>

                    <simpleviewergallery
                        
                        galleryStyle="MODERN"
                        textColor="FFFFFF"
                        frameColor="FFFFFF"
                        frameWidth="20"
                        thumbPosition="BOTTOM"
                        thumbColumns="10"
                        thumbRows="1"
                        showNavButtons="TRUE" 
                        showAutoPlayButton="TRUE" 
                        showOpenButton="FASLE" 
                        showFullscreenButton="FASLE" 
                        maxImageWidth="2000"
                        maxImageHeight="1640"
                        useFlickr="false"
                        flickrUserName=""
                        flickrTags=""
                        languageCode="AUTO"
                        languageList=""     
                        imagePath=""
                        thumbPath=""
                        
                    >';
    if (is_array($allthumbs)) {
        foreach ($allthumbs as $key => $row) {
            if ($key == 0 || $key == 1)
                continue;

            $content .= '<image imageURL="' . $row . '" thumbURL="' . $row . '" linkURL="" linkTarget="" >
                                <caption></caption> 
                            </image>';
        }
    }
    $content .= '</simpleviewergallery>';
    fwrite($file, $content);
    fclose($file);
}
?>

<!-- SLIDE DETAIL -->
<script src="<?php echo bloginfo('template_url'); ?>/js/bootstrap-paginator.js"></script>
<script src="<?php echo bloginfo('template_url'); ?>/js/qunit-1.11.0.js"></script>
<div class="main slide_detail" style="display:none;">

    <div class="input-hidden"></div>
    <div class="share-select">
        <div class="container text-right">
            <div class="ibtn share-btn">Chia sẻ</div>
            <div class="ibtn slide-btn"><span class="glyphicon glyphicon-play"></span> Slideshow</div>
        </div>
        <div id="ctl03_ControlBox_SharePopup" class="share-popup popup popup-bgcolor1 popup-border1 popup-color1 popup-font1" style="top: 30%; left: 30%; visibility: inherit;display:none;z-index:9999;">
            <div id="ctl03_ControlBox_SharePopup_ShareFrame" class="share-frame share-bgcolor0 share-color0 share-font0">
                <div class="sf-section-bg share-border0 share-bgcolor4">
                    <div class="sf-section-perm" id="ctl03_ControlBox_SharePopup_ShareFrame-links">
                        <div class="sf-head share-bgcolor5 share-color5">
                            <h4>Link to Gallery</h4>
                        </div>
                        <div class="sf-body">
                            <div id="ctl03_ControlBox_SharePopup_ShareFrame_Links" class="sf-links">
                                <div id="ctl03_ControlBox_SharePopup_ShareFrame_Links-url-item" class="sfl-url">
                                    <label for="ctl03_ControlBox_SharePopup_ShareFrame_Links-url">Copy and paste the link to this <span>gallery</span>:</label>
                                    <div class="sfl-box">
                                        <input value="<?php echo site_url() ?>/anh-cuoi/album-cuoi" type="text" id="ctl03_ControlBox_SharePopup_ShareFrame_Links-url" readonly="readonly">
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="sf-section-e sf-section-perm" id="ctl03_ControlBox_SharePopup_ShareFrame-share">
                        <div class="sf-head share-bgcolor6 share-color6">
                            <h4>Share via...</h4>
                        </div>
                        <div class="sf-body" style="display: block;">
                            <div id="ctl03_ControlBox_SharePopup_ShareFrame_Share" class="sf-share">
                                <div class="sfs-container sfsc-4">
                                    <a data="http://www.facebook.com/share.php?u=<?php echo site_url() ?>/anh-cuoi/album-cuoi" class="sfs-facebook">
                                        <div class="sfs-icon sfs-facebook-icon"></div>
                                        <span class="share-font10">
                                            Facebook
                                        </span>
                                    </a>
                                    <a data="https://twitter.com/share?via=<?php echo site_url() ?>/anh-cuoi/album-cuoi&text=Link to Gallery" class="sfs-twitter">
                                        <div class="sfs-icon sfs-twitter-icon"></div>
                                        <span class="share-font10">
                                            Twitter
                                        </span>
                                    </a>
                                    <a data="https://plusone.google.com/_/+1/confirm?hl=en&url=<?php echo site_url() ?>/anh-cuoi/album-cuoi" class="sfs-gplus">
                                        <div class="sfs-icon sfs-gplus-icon"></div>
                                        <span class="share-font10">
                                            Google+
                                        </span>
                                    </a>
                                    <a data="mailto:?subject=Invitation to view photographs&body=Link to Gallery: <?php echo site_url() ?>/anh-cuoi/album-cuoi" class="sfs-email">
                                        <div class="sfs-icon sfs-email-icon"></div>
                                        <span class="share-font10">
                                            Email
                                        </span>
                                    </a>
                                    <div class="clear"></div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="popup-footer">
                <div class="button">
                    <div class="standard button-color1 button-bgcolor1 button-border1" id="ctl03_ControlBox_SharePopup_ctl00-state">
                        <div class="middle">
                            <div class="button-font1">
                                Close
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <script type="text/javascript">
            var svAPI; //svAPI is the object to call API methods on

            $(document).keyup(function(e) {
                if (e.keyCode == 27) {
                    $('#sv-container').html('');
                    $('#sv-container').attr('style', '');
                    $('html').attr('style', '');
                    $('body').attr('style', '');
                    $('.header').show();
                    $('.anhcuoi.menu').show();
                    $('.breadcrumbs').show();
                    $('#wpadminbar').show();
                    $('#flash').parent().hide();
                    $('.container .col-7.abcxyz').css('width',($('.container').outerWidth(true)-315-10)+'px');
                }
            });
            $('#flash').keyup(function(e) {
                if (e.keyCode == 27) {
                    $('#sv-container').html('');
                    $('#sv-container').attr('style', '');
                    $('html').attr('style', '');
                    $('body').attr('style', '');
                    $('.header').show();
                    $('.anhcuoi.menu').show();
                    $('.breadcrumbs').show();
                    $('#wpadminbar').show();
                    $('#flash').parent().hide();
                    $('.container .col-7.abcxyz').css('width',($('.container').outerWidth(true)-315-10)+'px');
                }
            });
            $('.popup-footer .button-font1').live('click', function() {
                $('#ctl03_ControlBox_SharePopup').slideUp();
                $('.mask-black').fadeOut();
            });
            $("#ctl03_ControlBox_SharePopup_ShareFrame_Links-url").click(function() {
                $(this).select();
            });
            $('.share-btn').live('click', function() {
                $('.mask-black').fadeIn();
                $('#ctl03_ControlBox_SharePopup').slideDown();
            });
            $('.sfs-container.sfsc-4 a').click(function() {
                window.open($(this).attr('data'), 't', 'toolbar=0,resizable=1,status=0,width=640,height=528');
                return false;
            });
            $('.slide-btn').live('click', function() {
                var flashvars = {};
                flashvars.enableAPI = "true";
                flashvars.baseURL = "<?php echo $xml_url ?>";

                var params = {};
                params.allowfullscreen = true;
                params.allowscriptaccess = "always";
                params.bgcolor = "222222";
                params.wmode = "opaque";

                var attributes = {};
                attributes.id = "svInstance";
                attributes.name = "svInstance";

                $('html').attr('style', 'width:100%;height:100%;');
                $('body').attr('style', 'width:100%;height:100%;');

                simpleviewer.ready(function() {
                    svAPI = simpleviewer.load("sv-container", "100%", "100%", "222222", true, flashvars, params, attributes);
                    $('.header').hide();
                    $('.anhcuoi.menu').hide();
                    $('.breadcrumbs').hide();
                    var element = document.body;
                    var requestMethod = element.requestFullScreen || element.webkitRequestFullScreen || element.mozRequestFullScreen || element.msRequestFullScreen;
                    if (requestMethod) { // Native full screen.
                        requestMethod.call(element);
                    } else if (typeof window.ActiveXObject !== "undefined") { // Older IE.
                        var wscript = new ActiveXObject("WScript.Shell");
                        if (wscript !== null) {
                            wscript.SendKeys("{F11}");
                        }
                    }
                });
            });
        </script>
    </div>

    <div class="container">
        <div class="col-7 no-left abcxyz showimage">
<?php
if (is_array($allthumbs)) {
    foreach ($allthumbs as $key => $row) {
        if ($key == 0 || $key == 1)
            continue;
		$thumburl = get_site_url() . "/media/user_{$user_ID}/album-cuoi/full" . $row;

        $imgid = $key - 1;
        ?>
                    <div class="fullimage"><img src="<?php echo $thumburl ?>" title="" alt="" /></div>
                    <?php
                    break;
                }
            }
            ?>
        </div>
        <div class="col-5 abcxyz">
            <div class="control">
                <div class="col-2 next-last no-left"><span class="glyphicon glyphicon-chevron-left"></span></div>
                <div class="col-8 info-paginattion">
                    <span class="current-image">1</span> of <span class="total-image"><?php echo (count($allthumbs) - 2); ?></span> photos
                </div>
                <div class="col-2 next-last no-right"><span class="glyphicon glyphicon-chevron-right"></span></div>
                <div class="col-12 no-left no-right">
                    <div class="thumbimage">
<?php 
if (is_array($allthumbs)) {
    foreach ($allthumbs as $key => $row) {

		 $thumburl = get_site_url() . "/media/user_{$user_ID}/album-cuoi/tiny/" . $row;
		 $mediumurl = get_site_url() . "/media/user_{$user_ID}/album-cuoi/full/" . $row;
		 $orignal = get_site_url() . "/media/user_{$user_ID}/album-cuoi/orignal/" . $row;
        $imgid = $key - 1;
        ?>
                                <div style="display:none;" class="thumb-sm" data-name="<?php echo $row ?>" data-src="<?php echo $mediumurl ?>" data-id="<?php echo $imgid + 2 ?>" data-page="<?php echo (int) (($imgid + 1) / 8) + 1 ?>">
                                    <span class="imgid" itemid="<?php echo $row ?>" ><?php echo $imgid + 2 ?></span>
                                    <img src="<?php echo $thumburl ?>" title="" alt="" />
                                    <a class="fancybox" rel="group" href="<?php echo $orignal ?>"></a>
                                </div>
        <?php
    }
}
?>
                        <div id="pagination"></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript">
        var imgid = document.location.hash;
        $(document).ready(function() {
            if (imgid != '') {
                imgid = parseInt(imgid.replace('#', ''));
                init_gallery_random();
            }
        });
		$('.mask .info').live('click',function(){
			$("html, body").animate({ scrollTop: 0 }, "fast");
			imgid = $(this).attr('data');
			document.location.hash = imgid;
			init_gallery_random();
		});
        function init_gallery_random() {
            $('.container .col-7.abcxyz').css('width',($('.container').outerWidth(true)-315-10)+'px');
            $('.share-btn').css('display', '');
            $('.slide-btn').css('display', '');
            $('.cancel-btn').css('display', 'none');
            $('.select-btn').css('display', 'none');
            $('.actions-inner').css('display', 'none');
            $('.slide_thumb').css('display', 'none');
            $('.slide_detail').css('display', '');
            var options = {
                currentPage: 1,
                totalPages: <?php echo (int) ((count($allthumbs) - 3) / 8) + 1 ?>,
                onPageClicked: function(e, originalEvent, type, page) {
                    $('.thumb-sm').css('display', 'none');
                    $('.thumb-sm[data-page=' + page + ']').css('display', '');
                },
                onPageChanged: function(e, oldPage, newPage) {
                    $('.thumb-sm').css('display', 'none');
                    $('.thumb-sm[data-page=' + newPage + ']').css('display', '');
                }
            }
            $('#pagination').bootstrapPaginator(options);
            $('.thumb-sm[data-id=' + imgid + ']').click();
            var current_page = $('.thumb-sm[data-id=' + imgid + ']').attr('data-page');
            $('#pagination').bootstrapPaginator("show", current_page);
            if (current_page == 1) {
                $('.thumb-sm').css('display', 'none');
                $('.thumb-sm[data-page=1]').css('display', '');
            }
        }
    </script>
    <script type="text/javascript">
        $('.fullimage img').live('click', function() {
            var current_thumb = $('.thumb-sm.active').attr('data-id');
            $('.thumb-sm[data-id=' + (parseInt(current_thumb)) + ']').find('.fancybox').click();
        });
        $('.thumb-sm').live('click', function() {
            var src_image = $(this).attr('data-src');
            $('.fullimage img').attr('src', src_image);
            $('.thumb-sm').removeClass('active');
            $(this).addClass('active');

            var current_thumb = $('.thumb-sm.active').attr('data-id');
            $('.current-image').html(parseInt(current_thumb));
            document.location.hash = current_thumb;
        });
        $('.fancybox-skin a[title=Previous], .next-last.no-left span').live('click', function() {
            var current_thumb = $('.thumb-sm.active').attr('data-id');
            if (current_thumb == 1)
                return;
            $('.thumb-sm').removeClass('active');
            $('.thumb-sm[data-id=' + (parseInt(current_thumb) - 1) + ']').addClass('active');

            var current_page = $('.thumb-sm[data-id=' + current_thumb + ']').attr('data-page');
            var prev_page = $('.thumb-sm[data-id=' + (parseInt(current_thumb) - 1) + ']').attr('data-page');
            if (prev_page != current_page)
                $('#pagination').bootstrapPaginator("show", prev_page);

            $('.current-image').html(parseInt(current_thumb) - 1);
            var src_image = $('.thumb-sm[data-id=' + (parseInt(current_thumb) - 1) + ']').attr('data-src');
            $('.fullimage img').attr('src', src_image);
            document.location.hash = parseInt(current_thumb) - 1;
        });
        $('.fancybox-skin a[title=Next], .next-last.no-right span').live('click', function() {
            var current_thumb = $('.thumb-sm.active').attr('data-id');
            if (current_thumb ==<?php echo (count($allthumbs) - 2); ?>)
                return;
            $('.thumb-sm').removeClass('active');
            $('.thumb-sm[data-id=' + (parseInt(current_thumb) + 1) + ']').addClass('active');

            var current_page = $('.thumb-sm[data-id=' + current_thumb + ']').attr('data-page');
            var next_page = $('.thumb-sm[data-id=' + (parseInt(current_thumb) + 1) + ']').attr('data-page');
            if (next_page != current_page)
                $('#pagination').bootstrapPaginator("show", next_page);

            $('.current-image').html(parseInt(current_thumb) + 1);
            var src_image = $('.thumb-sm[data-id=' + (parseInt(current_thumb) + 1) + ']').attr('data-src');
            $('.fullimage img').attr('src', src_image);
            document.location.hash = parseInt(current_thumb) + 1;
        });
        $('#share-buttons a[href=javascript:;]').live('click',function() {
            window.open($(this).attr('data'), 't', 'toolbar=0,resizable=1,status=0,width=640,height=480');
            return false;
        });
        $(".fancybox").attr('title',' ');
        $(".fancybox").fancybox({
            closeBtn: true,
            beforeShow: function () {
                if (this.title) {
                    this.title += '<div id="share-buttons">\
                    <a href="javascript:;" data="http://www.facebook.com/sharer.php?u=' + this.href + '" target="_blank"><img src="http://www.simplesharebuttons.com/images/somacro/facebook.png" alt="Facebook" /></a>\
                    <a href="javascript:;" data="http://twitter.com/share?url=' + this.href + '&text=' + this.href + '" target="_blank"><img src="http://www.simplesharebuttons.com/images/somacro/twitter.png" alt="Twitter" /></a>\
                    <a href="javascript:;" data="https://plus.google.com/share?url=' + this.href + '" target="_blank"><img src="http://www.simplesharebuttons.com/images/somacro/google.png" alt="Google" /></a>\
                    <a href="javascript:;" data="http://www.digg.com/submit?url=' + this.href + '" target="_blank"><img src="http://www.simplesharebuttons.com/images/somacro/diggit.png" alt="Digg" /></a>\
                    <a href="javascript:;" data="http://reddit.com/submit?url=' + this.href + '&title=' + this.href + '" target="_blank"><img src="http://www.simplesharebuttons.com/images/somacro/reddit.png" alt="Reddit" /></a>\
                    <a href="javascript:;" data="http://www.linkedin.com/shareArticle?mini=true&url=' + this.href + '" target="_blank"><img src="http://www.simplesharebuttons.com/images/somacro/linkedin.png" alt="LinkedIn" /></a>\
                    <a href="javascript:void((function()%7Bvar%20e=document.createElement(\'script\');e.setAttribute(\'type\',\'text/javascript\');e.setAttribute(\'charset\',\'UTF-8\');e.setAttribute(\'src\',\'http://assets.pinterest.com/js/pinmarklet.js?r=\'+Math.random()*99999999);document.body.appendChild(e)%7D)());"><img src="http://www.simplesharebuttons.com/images/somacro/pinterest.png" alt="Pinterest" /></a>\
                    </div>';
                }
            },
            helpers: {
                title: {type: 'inside'},
            }
        });
        $(".fancybox_thumb").attr('title',' ');
        $(".fancybox_thumb").fancybox({
            closeBtn: true,
            beforeShow: function () {
                if (this.title) {
                   this.title += '<div id="share-buttons">\
                    <a href="javascript:;" data="http://www.facebook.com/sharer.php?u=' + this.href + '" target="_blank"><img src="http://www.simplesharebuttons.com/images/somacro/facebook.png" alt="Facebook" /></a>\
                    <a href="javascript:;" data="http://twitter.com/share?url=' + this.href + '&text=' + this.href + '" target="_blank"><img src="http://www.simplesharebuttons.com/images/somacro/twitter.png" alt="Twitter" /></a>\
                    <a href="javascript:;" data="https://plus.google.com/share?url=' + this.href + '" target="_blank"><img src="http://www.simplesharebuttons.com/images/somacro/google.png" alt="Google" /></a>\
                    <a href="javascript:;" data="http://www.digg.com/submit?url=' + this.href + '" target="_blank"><img src="http://www.simplesharebuttons.com/images/somacro/diggit.png" alt="Digg" /></a>\
                    <a href="javascript:;" data="http://reddit.com/submit?url=' + this.href + '&title=' + this.href + '" target="_blank"><img src="http://www.simplesharebuttons.com/images/somacro/reddit.png" alt="Reddit" /></a>\
                    <a href="javascript:;" data="http://www.linkedin.com/shareArticle?mini=true&url=' + this.href + '" target="_blank"><img src="http://www.simplesharebuttons.com/images/somacro/linkedin.png" alt="LinkedIn" /></a>\
                    <a href="javascript:void((function()%7Bvar%20e=document.createElement(\'script\');e.setAttribute(\'type\',\'text/javascript\');e.setAttribute(\'charset\',\'UTF-8\');e.setAttribute(\'src\',\'http://assets.pinterest.com/js/pinmarklet.js?r=\'+Math.random()*99999999);document.body.appendChild(e)%7D)());"><img src="http://www.simplesharebuttons.com/images/somacro/pinterest.png" alt="Pinterest" /></a>\
                    </div>';
                }
            },
            helpers: {
                title: {type: 'inside'},
            }
        });
    </script>
<div style="display:none;"><input type="text" id="flash" /></div>
<div id="messagebox">
    <h2 id="messagebox-heading"> Đang chuyển đổi...</h2>
    <p id="messagebox-description"> Vui lòng chờ trong giây lát</p>
    <span class="icon"></span>
</div>
<!-- SLIDE DETAIL -->
</div>
<?php get_footer(); ?>
